-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate the Windows manifests as well #2704
Conversation
This is just an alias for `@(MauiImage)`: `<MauiImage Include="@(MauiAppIcon)" IsAppIcon="True" />`
@@ -12,6 +12,8 @@ | |||
<WindowsPackageType>MSIX</WindowsPackageType> | |||
<ApplicationTitle>.NET MAUI Controls</ApplicationTitle> | |||
<ApplicationId>com.microsoft.maui.sample</ApplicationId> | |||
<ApplicationId Condition="$(TargetFramework.Contains('-windows'))">f9e4fa3e-3505-4742-9b2b-d1acdaff4ec8</ApplicationId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows uses a GUID for this, so we unfortunately need to condition. Maybe we can have an $(ApplicationGuid)
? Then we don't need this and we can potentially use that GUID in other OS. Not sure what Tizen uses? @rookiejava
src/Controls/samples/Controls.Sample/Maui.Controls.Sample-net6.csproj
Outdated
Show resolved
Hide resolved
src/SingleProject/Resizetizer/src/GeneratePackageAppxManifest.cs
Outdated
Show resolved
Hide resolved
src/SingleProject/Resizetizer/src/GeneratePackageAppxManifest.cs
Outdated
Show resolved
Hide resolved
I Updated the templates to make use of this. All that was needed was 2 new properties: <ApplicationId Condition="$(TargetFramework.Contains('-windows'))">8B51DC95-6D07-4C39-BC6C-3BFE96E8A7EA</ApplicationId>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion> This should be a no-op on existing projects with manifests. Only the missing properties are filled in and all existing projects already have complete manifests. To make it work, all the user has to do is delete the bits in the manifest that can be generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we decide on what this does, can you send a PR to fill in what windows does in this doc here:
(or we could consider moving this doc to the MAUI repo) I didn't want to put it in dotnet/designs and go through review there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment about GUID. Maybe one was missed from template.json
already there:
"8B51DC95-6D07-4C39-BC6C-3BFE96E8A7EA" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest changes look OK to me. 👍
Description of Change
Until the Windows build system supports the new One .NET properties, Resizetizer can do this to fill in the gaps.
Additions made
MauiGeneratePackageAppxManifest
task to generate a completed manifest.$(ApplicationId)
must be a GUID and is used as the app id for the store. To be used in a single project, they can be conditioned:$(ApplicationDisplayVersion)
and$(ApplicationVersion)
are merged to form the app version. Tnis is possible because iOS/Mac Catalyst need the version to be a 3 part version number. If there are not enough parts, then zeroes (0) are used to full the gaps. Because Windows only has a single version attribute, we can just merge:$(ApplicationTitle)
is used for several names:$(ApplicationDescription)
)@(MauiImage)
withIsAppIcon="true"
is used to generate the images for the tiles, icons and logos.@(MauiSplashScreen)
is used to generate the splash screen (not sure where this appears)@(MauiAppIcon)
which is just an alias for@(MauiImage)
:If any of these components are missing, then it is just ignored and will require the developer manually enter values in the manifest.
If there are any of these values in the manifest already, then this task will not overwrite. Native manifest always takes priority.
Example
New minimum manifest:
Project Properties:
Generated Manifest:
PR Checklist
Does this PR touch anything that might affect accessibility?
If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.